import { service } from '@/common/tools/luch-request/index.js';

//删除用户配送地址
export function deleteUserShippingAddress(data) {
    return service.request({
            url: '/applet/ShippingAddress/deleteUserShippingAddress',
            method: 'post',
            data,
        }
    )
}

//查询用户配送地址列表
export function getUserShippingAddress(params) {
    return service.request({
            url: '/applet/ShippingAddress/getUserShippingAddress',
            method: 'get',
            params,
        }
    )
}

//新增/修改用户配送地址
export function changeUserShippingAddress(data) {
    return service.request({
            url: '/applet/ShippingAddress/changeUserShippingAddress',
            method: 'post',
            data
        }
    )
}

//微信用户发布需求
export function postDemand(data) {
    return service.request({
            url: '/applet/Order/postDemand',
            method: 'post',
            data
        }
    )
}

//查询需求类型选择框数据和快递公司选择框数据
export function getDemandTypeCourierServicesCompany(data) {
    return service.request({
            url: '/applet/Order/getDemandTypeCourierServicesCompany',
            method: 'post',
            data
        }
    )
}

//查询社区需求信息列表
export function getCommunityDemandInfoList(params) {
    return service.request({
            url: '/applet/Order/getCommunityDemandInfoList',
            method: 'get',
            params
        }
    )
}

//查询社区需求订单详细信息
export function getDemandOrderInfo(params) {
    return service.request({
            url: '/applet/Order/getDemandOrderInfo',
            method: 'get',
            params
        }
    )
}

//骑手接需求订单
export function wechatUserTakeOrder(data) {
    return service.request({
            url: '/applet/Order/wechatUserTakeOrder',
            method: 'post',
            data
        }
    )
}

//骑手确认送达
export function confirmDelivery(data) {
    return service.request({
            url: '/applet/Order/confirmDelivery',
            method: 'post',
            data
        }
    )
}

//用户确认收货
export function wechatUserConfirmDelivery(data) {
    return service.request({
            url: '/applet/Order/wechatUserConfirmDelivery',
            method: 'post',
            data
        }
    )
}

//微信用户取消未支付需求订单或自行退款未接单订单
//
export function changeNoDemandOrderStatus(data) {
    return service.request({
            url: '/applet/Order/changeNoDemandOrderStatus',
            method: 'post',
            data
        }
    )
}